{% load staticfiles %}
{% load displaypage %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{% block title %}主页{% endblock %}</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link rel="shortcut icon" href="{% static 'image/logo.png' %}"/>


    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{% static 'plugins/font-awesome-4.6.3/css/font-awesome.min.css' %}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{% static 'plugins/ionicons-2.0.1/css/ionicons.min.css' %}">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->

    {% block css %}{% endblock %}

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <header class="main-header">
        <!-- Logo -->
        <a href="#" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini">ERP</span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>办公用品登记系统</b></span>
        </a>


        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>

        {% is_leader request.session.user_name as display %}

            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">


                    {% if display %}
                        <li class="dropdown notifications-menu">

                            <a href="/admin" class="dropdown-toggle">
                                <i class="fa fa-bank"></i>
                                后台管理
                            </a>

                        </li>
                    {% endif %}




                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="{% static 'dist/img/avatar5.png' %}" class="user-image" alt="User Image">
                            <span class="hidden-xs">欢迎,{{ request.session.user_name }}</span>
                        </a>


                    </li>
                    <!-- Control Sidebar Toggle Button -->

                    <li>
                        <a href="{% url 'register:logout' %}"><span style="font-size: 12px;">退出登录</span></a>
                    </li>
                </ul>

            </div>

        </nav>


    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">

            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
                </div>
            </form>

            {% if display %}
                <ul class="sidebar-menu" data-widget="tree">
                    <li class="header">导航栏</li>


                    <li class="treeview">
                        <a href="{% url 'register:index_articles' %}">
                            <i class="fa fa-table"></i> <span>办公用品</span>
                            <span class="pull-right-container">

            </span>
                        </a>
                    </li>
                    <li class="treeview active  menu-open">
                        <a href="{% url 'register:index_warehousing' %}">
                            <i class="fa fa-magic"></i> <span>入库</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>

            </span>
                        </a>

                        <ul class="treeview-menu">
                            <li class="active">
                                <a href="{% url 'register:index_warehousing' %}">
                                    <span>入库明细表</span>
                                    <span class="pull-right-container">


                            </span>
                                </a>
                            </li>
                            <li class="active">
                                <a href="{% url 'register:total_warehousing' %}">
                                    <span>入库总表</span>
                                    <span class="pull-right-container">


                            </span>
                                </a>
                            </li>
                        </ul>
                    </li>


                    <li class="treeview  active menu-open">
                        <a href="{% url 'register:index_ex_warehouse' %}">
                            <i class="fa fa-bell-o"></i><span>出库表</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>

                        <ul class="treeview-menu">
                            <li class="active">
                                <a href="{% url 'register:index_ex_warehouse' %}">
                                    <span>出库明细表</span>
                                    <span class="pull-right-container">


                            </span>
                                </a>
                            </li>
                            <li class="active">
                                <a href="{% url 'register:total_ex_warehouse' %}">
                                    <span>出库总表</span>
                                    <span class="pull-right-container">


                            </span>
                                </a>
                            </li>
                        </ul>
                    </li>


                    <li class="treeview">
                        <a href="{% url 'register:index_stock' %}">
                            <i class="fa fa-intersex"></i> <span>库存表</span>
                            <span class="pull-right-container">

            </span>
                        </a>
                    </li>

                    <li class="treeview">
                        <a href="{% url 'register:index_ex_warehouse' 1 %}">
                            <i class="fa fa-cc-jcb"></i> <span>代办事项</span>
                            <span class="pull-right-container">

            </span>
                        </a>
                    </li>
                </ul>
            {% else %}
                <ul class="sidebar-menu" data-widget="tree">
                    <li class="header">导航栏</li>


                    <li class="treeview">
                        <a href="{% url 'register:index_ex_warehouse' 1 %}">
                            <i class="fa fa-table"></i> <span>待办理事项</span>
                            <span class="pull-right-container">

            </span>
                        </a>
                    </li>
                <li class="treeview">
                        <a href="{% url 'register:index_ex_warehouse' 2 %}">
                            <i class="fa fa-table"></i> <span>已出库单</span>
                            <span class="pull-right-container">

            </span>
                        </a>
                    </li>


                </ul>
            {% endif %}

        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">

        {#        主体内容全放到这里！#}
        {% block content %}{% endblock %}

    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 1.0.1
        </div>
        {#        <strong>Copyright &copy; 2018 <a target="_blank">bc</a>.</strong> All rights#}
        {#        reserved.#}
        <strong>Developed by <a target="_blank">LJL</a></strong>
    </footer>


</div>
<!-- ./wrapper -->


<!-- jQuery 2.2.3 -->
<script src="{% static 'plugins/jQuery/jquery-2.2.3.min.js' %}"></script>
<!-- jQuery UI 1.11.4 -->
<script src="{% static 'plugins/jQueryUI/jquery-ui.min.js' %}"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
    $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.6 -->
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>

<script language="JavaScript">
    function delete_data() {
        if (confirm('您确定要删除吗？')) {
            return true;
        } else {
            return false;
        }
    }
</script>


{% block script %}{% endblock %}

</body>
</html>
